\(\int \frac {1}{\sqrt {-2-b x} \sqrt {2+b x}} \, dx\) [1541]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [C] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [C] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 20, antiderivative size = 29 \[ \int \frac {1}{\sqrt {-2-b x} \sqrt {2+b x}} \, dx=\frac {\sqrt {2+b x} \log (2+b x)}{b \sqrt {-2-b x}} \]

[Out]

ln(b*x+2)*(b*x+2)^(1/2)/b/(-b*x-2)^(1/2)

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {23, 31} \[ \int \frac {1}{\sqrt {-2-b x} \sqrt {2+b x}} \, dx=\frac {\sqrt {b x+2} \log (b x+2)}{b \sqrt {-b x-2}} \]

[In]

Int[1/(Sqrt[-2 - b*x]*Sqrt[2 + b*x]),x]

[Out]

(Sqrt[2 + b*x]*Log[2 + b*x])/(b*Sqrt[-2 - b*x])

Rule 23

Int[(u_.)*((a_) + (b_.)*(v_))^(m_)*((c_) + (d_.)*(v_))^(n_), x_Symbol] :> Dist[(a + b*v)^m/(c + d*v)^m, Int[u*
(c + d*v)^(m + n), x], x] /; FreeQ[{a, b, c, d, m, n}, x] && EqQ[b*c - a*d, 0] &&  !(IntegerQ[m] || IntegerQ[n
] || GtQ[b/d, 0])

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rubi steps \begin{align*} \text {integral}& = \frac {\sqrt {2+b x} \int \frac {1}{2+b x} \, dx}{\sqrt {-2-b x}} \\ & = \frac {\sqrt {2+b x} \log (2+b x)}{b \sqrt {-2-b x}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.97 \[ \int \frac {1}{\sqrt {-2-b x} \sqrt {2+b x}} \, dx=\frac {(2+b x) \log (2+b x)}{b \sqrt {-(2+b x)^2}} \]

[In]

Integrate[1/(Sqrt[-2 - b*x]*Sqrt[2 + b*x]),x]

[Out]

((2 + b*x)*Log[2 + b*x])/(b*Sqrt[-(2 + b*x)^2])

Maple [A] (verified)

Time = 0.53 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.90

method result size
default \(\frac {\ln \left (b x +2\right ) \sqrt {b x +2}}{b \sqrt {-b x -2}}\) \(26\)
meijerg \(\frac {\sqrt {\operatorname {signum}\left (\frac {b x}{2}+1\right )}\, \ln \left (\frac {b x}{2}+1\right )}{\sqrt {-\operatorname {signum}\left (\frac {b x}{2}+1\right )}\, b}\) \(32\)
risch \(-\frac {i \sqrt {\frac {-b x -2}{b x +2}}\, \sqrt {b x +2}\, \ln \left (b x +2\right )}{\sqrt {-b x -2}\, b}\) \(44\)

[In]

int(1/(-b*x-2)^(1/2)/(b*x+2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

ln(b*x+2)*(b*x+2)^(1/2)/b/(-b*x-2)^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.62 \[ \int \frac {1}{\sqrt {-2-b x} \sqrt {2+b x}} \, dx=-\frac {\sqrt {-b^{2}} \log \left (b x + 2\right )}{b^{2}} \]

[In]

integrate(1/(-b*x-2)^(1/2)/(b*x+2)^(1/2),x, algorithm="fricas")

[Out]

-sqrt(-b^2)*log(b*x + 2)/b^2

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 1.02 (sec) , antiderivative size = 87, normalized size of antiderivative = 3.00 \[ \int \frac {1}{\sqrt {-2-b x} \sqrt {2+b x}} \, dx=\begin {cases} \frac {i \log {\left (\frac {1}{x + \frac {2}{b}} \right )}}{b} - \frac {i \log {\left (x + \frac {2}{b} \right )}}{b} & \text {for}\: \frac {1}{\left |{x + \frac {2}{b}}\right |} < 1 \wedge \left |{x + \frac {2}{b}}\right | < 1 \\- \frac {i \log {\left (x + \frac {2}{b} \right )}}{b} & \text {for}\: \left |{x + \frac {2}{b}}\right | < 1 \\\frac {i \log {\left (\frac {1}{x + \frac {2}{b}} \right )}}{b} & \text {for}\: \frac {1}{\left |{x + \frac {2}{b}}\right |} < 1 \\\frac {i {G_{2, 2}^{2, 0}\left (\begin {matrix} & 1, 1 \\0, 0 & \end {matrix} \middle | {x + \frac {2}{b}} \right )}}{b} - \frac {i {G_{2, 2}^{0, 2}\left (\begin {matrix} 1, 1 & \\ & 0, 0 \end {matrix} \middle | {x + \frac {2}{b}} \right )}}{b} & \text {otherwise} \end {cases} \]

[In]

integrate(1/(-b*x-2)**(1/2)/(b*x+2)**(1/2),x)

[Out]

Piecewise((I*log(1/(x + 2/b))/b - I*log(x + 2/b)/b, (Abs(x + 2/b) < 1) & (1/Abs(x + 2/b) < 1)), (-I*log(x + 2/
b)/b, Abs(x + 2/b) < 1), (I*log(1/(x + 2/b))/b, 1/Abs(x + 2/b) < 1), (I*meijerg(((), (1, 1)), ((0, 0), ()), x
+ 2/b)/b - I*meijerg(((1, 1), ()), ((), (0, 0)), x + 2/b)/b, True))

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.55 \[ \int \frac {1}{\sqrt {-2-b x} \sqrt {2+b x}} \, dx=\sqrt {-\frac {1}{b^{2}}} \log \left (x + \frac {2}{b}\right ) \]

[In]

integrate(1/(-b*x-2)^(1/2)/(b*x+2)^(1/2),x, algorithm="maxima")

[Out]

sqrt(-1/b^2)*log(x + 2/b)

Giac [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.31 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.55 \[ \int \frac {1}{\sqrt {-2-b x} \sqrt {2+b x}} \, dx=-\frac {i \, \log \left ({\left | b x + 2 \right |}\right ) \mathrm {sgn}\left (b\right ) \mathrm {sgn}\left (x\right )}{b} \]

[In]

integrate(1/(-b*x-2)^(1/2)/(b*x+2)^(1/2),x, algorithm="giac")

[Out]

-I*log(abs(b*x + 2))*sgn(b)*sgn(x)/b

Mupad [B] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.62 \[ \int \frac {1}{\sqrt {-2-b x} \sqrt {2+b x}} \, dx=-\frac {4\,\mathrm {atan}\left (\frac {b\,\left (-\sqrt {-b\,x-2}+\sqrt {2}\,1{}\mathrm {i}\right )}{\left (\sqrt {2}-\sqrt {b\,x+2}\right )\,\sqrt {b^2}}\right )}{\sqrt {b^2}} \]

[In]

int(1/((b*x + 2)^(1/2)*(- b*x - 2)^(1/2)),x)

[Out]

-(4*atan((b*(2^(1/2)*1i - (- b*x - 2)^(1/2)))/((2^(1/2) - (b*x + 2)^(1/2))*(b^2)^(1/2))))/(b^2)^(1/2)